﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>发文记录</summary>
	[Object("发文记录", "CKQDJK", "发文记录")]
	[Browsable(true)]
	[DisplayName("发文记录")]
	[ReadOnly(false)]
	[Serializable()]
	public class 发文记录 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：CK_GUID</summary>
		private string m_CK_GUID;
		
		/// <summary>标示属性CK_GUID是否为空的字段。</summary>
		private bool m_IsCK_GUIDNull = true;
		
		/// <summary>内部变量：关联号</summary>
		private string m_关联号;
		
		/// <summary>标示属性关联号是否为空的字段。</summary>
		private bool m_Is关联号Null = true;
		
		/// <summary>内部变量：许可证号</summary>
		private string m_许可证号;
		
		/// <summary>标示属性许可证号是否为空的字段。</summary>
		private bool m_Is许可证号Null = true;
		
		/// <summary>内部变量：项目类型</summary>
		private int m_项目类型;
		
		/// <summary>标示属性项目类型是否为空的字段。</summary>
		private bool m_Is项目类型Null = true;
		
		/// <summary>内部变量：公文类别</summary>
		private string m_公文类别;
		
		/// <summary>标示属性公文类别是否为空的字段。</summary>
		private bool m_Is公文类别Null = true;
		
		/// <summary>内部变量：文号</summary>
		private string m_文号;
		
		/// <summary>标示属性文号是否为空的字段。</summary>
		private bool m_Is文号Null = true;
		
		/// <summary>内部变量：文号_类别</summary>
		private string m_文号_类别;
		
		/// <summary>标示属性文号_类别是否为空的字段。</summary>
		private bool m_Is文号_类别Null = true;
		
		/// <summary>内部变量：文号_年号</summary>
		private int m_文号_年号;
		
		/// <summary>标示属性文号_年号是否为空的字段。</summary>
		private bool m_Is文号_年号Null = true;
		
		/// <summary>内部变量：文号_序号</summary>
		private int m_文号_序号;
		
		/// <summary>标示属性文号_序号是否为空的字段。</summary>
		private bool m_Is文号_序号Null = true;
		
		/// <summary>内部变量：抄送</summary>
		private string m_抄送;
		
		/// <summary>标示属性抄送是否为空的字段。</summary>
		private bool m_Is抄送Null = true;
		
		/// <summary>内部变量：发文时间</summary>
		private System.DateTime m_发文时间;
		
		/// <summary>标示属性发文时间是否为空的字段。</summary>
		private bool m_Is发文时间Null = true;
		
		/// <summary>内部变量：拟稿</summary>
		private string m_拟稿;
		
		/// <summary>标示属性拟稿是否为空的字段。</summary>
		private bool m_Is拟稿Null = true;
		
		/// <summary>内部变量：签发</summary>
		private string m_签发;
		
		/// <summary>标示属性签发是否为空的字段。</summary>
		private bool m_Is签发Null = true;
		
		/// <summary>内部变量：公文文头</summary>
		private string m_公文文头;
		
		/// <summary>标示属性公文文头是否为空的字段。</summary>
		private bool m_Is公文文头Null = true;
		
		/// <summary>内部变量：项目档案号</summary>
		private string m_项目档案号;
		
		/// <summary>标示属性项目档案号是否为空的字段。</summary>
		private bool m_Is项目档案号Null = true;
		
		/// <summary>内部变量：正文</summary>
		private string m_正文;
		
		/// <summary>标示属性正文是否为空的字段。</summary>
		private bool m_Is正文Null = true;
		
		/// <summary>内部变量：备注</summary>
		private string m_备注;
		
		/// <summary>标示属性备注是否为空的字段。</summary>
		private bool m_Is备注Null = true;
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		public static string TypeID = "CKQDJK.发文记录";
		
		/// <summary>属性CK_GUID</summary>
		[Member("CK_GUID", "CK_GUID", "System.String", 80, false, false, "CK_GUID")]
		[Browsable(true)]
		[DisplayName("CK_GUID")]
		[ReadOnly(false)]
		public string CK_GUID {
			get {
				return this.m_CK_GUID;
			}
			set {
				this.m_CK_GUID = value;
				this.m_IsCK_GUIDNull = false;
			}
		}
		
		/// <summary>属性关联号</summary>
		[Member("关联号", "关联号", "System.String", 80, false, false, "关联号")]
		[Browsable(true)]
		[DisplayName("关联号")]
		[ReadOnly(false)]
		public string 关联号 {
			get {
				return this.m_关联号;
			}
			set {
				this.m_关联号 = value;
				this.m_Is关联号Null = false;
			}
		}
		
		/// <summary>属性许可证号</summary>
		[Member("许可证号", "许可证号", "System.String", 50, false, false, "许可证号")]
		[Browsable(true)]
		[DisplayName("许可证号")]
		[ReadOnly(false)]
		public string 许可证号 {
			get {
				return this.m_许可证号;
			}
			set {
				this.m_许可证号 = value;
				this.m_Is许可证号Null = false;
			}
		}
		
		/// <summary>属性项目类型</summary>
		[Member("项目类型", "项目类型", "System.Int32", 4, false, false, "项目类型")]
		[Browsable(true)]
		[DisplayName("项目类型")]
		[ReadOnly(false)]
		public int 项目类型 {
			get {
				return this.m_项目类型;
			}
			set {
				this.m_项目类型 = value;
				this.m_Is项目类型Null = false;
			}
		}
		
		/// <summary>属性公文类别</summary>
		[Member("公文类别", "公文类别", "System.String", 100, false, false, "公文类别")]
		[Browsable(true)]
		[DisplayName("公文类别")]
		[ReadOnly(false)]
		public string 公文类别 {
			get {
				return this.m_公文类别;
			}
			set {
				this.m_公文类别 = value;
				this.m_Is公文类别Null = false;
			}
		}
		
		/// <summary>属性文号</summary>
		[Member("文号", "文号", "System.String", 120, false, false, "文号")]
		[Browsable(true)]
		[DisplayName("文号")]
		[ReadOnly(false)]
		public string 文号 {
			get {
				return this.m_文号;
			}
			set {
				this.m_文号 = value;
				this.m_Is文号Null = false;
			}
		}
		
		/// <summary>属性文号_类别</summary>
		[Member("文号_类别", "文号_类别", "System.String", 60, false, false, "文号_类别")]
		[Browsable(true)]
		[DisplayName("文号_类别")]
		[ReadOnly(false)]
		public string 文号_类别 {
			get {
				return this.m_文号_类别;
			}
			set {
				this.m_文号_类别 = value;
				this.m_Is文号_类别Null = false;
			}
		}
		
		/// <summary>属性文号_年号</summary>
		[Member("文号_年号", "文号_年号", "System.Int32", 4, false, false, "文号_年号")]
		[Browsable(true)]
		[DisplayName("文号_年号")]
		[ReadOnly(false)]
		public int 文号_年号 {
			get {
				return this.m_文号_年号;
			}
			set {
				this.m_文号_年号 = value;
				this.m_Is文号_年号Null = false;
			}
		}
		
		/// <summary>属性文号_序号</summary>
		[Member("文号_序号", "文号_序号", "System.Int32", 4, false, false, "文号_序号")]
		[Browsable(true)]
		[DisplayName("文号_序号")]
		[ReadOnly(false)]
		public int 文号_序号 {
			get {
				return this.m_文号_序号;
			}
			set {
				this.m_文号_序号 = value;
				this.m_Is文号_序号Null = false;
			}
		}
		
		/// <summary>属性抄送</summary>
		[Member("抄送", "抄送", "System.String", 200, false, false, "抄送")]
		[Browsable(true)]
		[DisplayName("抄送")]
		[ReadOnly(false)]
		public string 抄送 {
			get {
				return this.m_抄送;
			}
			set {
				this.m_抄送 = value;
				this.m_Is抄送Null = false;
			}
		}
		
		/// <summary>属性发文时间</summary>
		[Member("发文时间", "发文时间", "System.DateTime", 8, false, false, "发文时间")]
		[Browsable(true)]
		[DisplayName("发文时间")]
		[ReadOnly(false)]
		public System.DateTime 发文时间 {
			get {
				return this.m_发文时间;
			}
			set {
				this.m_发文时间 = value;
				this.m_Is发文时间Null = false;
			}
		}
		
		/// <summary>属性拟稿</summary>
		[Member("拟稿", "拟稿", "System.String", 24, false, false, "拟稿")]
		[Browsable(true)]
		[DisplayName("拟稿")]
		[ReadOnly(false)]
		public string 拟稿 {
			get {
				return this.m_拟稿;
			}
			set {
				this.m_拟稿 = value;
				this.m_Is拟稿Null = false;
			}
		}
		
		/// <summary>属性签发</summary>
		[Member("签发", "签发", "System.String", 24, false, false, "签发")]
		[Browsable(true)]
		[DisplayName("签发")]
		[ReadOnly(false)]
		public string 签发 {
			get {
				return this.m_签发;
			}
			set {
				this.m_签发 = value;
				this.m_Is签发Null = false;
			}
		}
		
		/// <summary>属性公文文头</summary>
		[Member("公文文头", "公文文头", "System.String", 160, false, false, "公文文头")]
		[Browsable(true)]
		[DisplayName("公文文头")]
		[ReadOnly(false)]
		public string 公文文头 {
			get {
				return this.m_公文文头;
			}
			set {
				this.m_公文文头 = value;
				this.m_Is公文文头Null = false;
			}
		}
		
		/// <summary>属性项目档案号</summary>
		[Member("项目档案号", "项目档案号", "System.String", 50, false, false, "项目档案号")]
		[Browsable(true)]
		[DisplayName("项目档案号")]
		[ReadOnly(false)]
		public string 项目档案号 {
			get {
				return this.m_项目档案号;
			}
			set {
				this.m_项目档案号 = value;
				this.m_Is项目档案号Null = false;
			}
		}
		
		/// <summary>属性正文</summary>
		[Member("正文", "正文", "System.String", -1, false, false, "正文")]
		[Browsable(true)]
		[DisplayName("正文")]
		[ReadOnly(false)]
		public string 正文 {
			get {
				return this.m_正文;
			}
			set {
				this.m_正文 = value;
				this.m_Is正文Null = false;
			}
		}
		
		/// <summary>属性备注</summary>
		[Member("备注", "备注", "System.String", -1, false, false, "备注")]
		[Browsable(true)]
		[DisplayName("备注")]
		[ReadOnly(false)]
		public string 备注 {
			get {
				return this.m_备注;
			}
			set {
				this.m_备注 = value;
				this.m_Is备注Null = false;
			}
		}
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, true, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			发文记录 发文记录 = ((发文记录)(obj));
			if ((发文记录.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("CK_GUID")) {
				return this.m_IsCK_GUIDNull;
			}
			if (propname.Equals("关联号")) {
				return this.m_Is关联号Null;
			}
			if (propname.Equals("许可证号")) {
				return this.m_Is许可证号Null;
			}
			if (propname.Equals("项目类型")) {
				return this.m_Is项目类型Null;
			}
			if (propname.Equals("公文类别")) {
				return this.m_Is公文类别Null;
			}
			if (propname.Equals("文号")) {
				return this.m_Is文号Null;
			}
			if (propname.Equals("文号_类别")) {
				return this.m_Is文号_类别Null;
			}
			if (propname.Equals("文号_年号")) {
				return this.m_Is文号_年号Null;
			}
			if (propname.Equals("文号_序号")) {
				return this.m_Is文号_序号Null;
			}
			if (propname.Equals("抄送")) {
				return this.m_Is抄送Null;
			}
			if (propname.Equals("发文时间")) {
				return this.m_Is发文时间Null;
			}
			if (propname.Equals("拟稿")) {
				return this.m_Is拟稿Null;
			}
			if (propname.Equals("签发")) {
				return this.m_Is签发Null;
			}
			if (propname.Equals("公文文头")) {
				return this.m_Is公文文头Null;
			}
			if (propname.Equals("项目档案号")) {
				return this.m_Is项目档案号Null;
			}
			if (propname.Equals("正文")) {
				return this.m_Is正文Null;
			}
			if (propname.Equals("备注")) {
				return this.m_Is备注Null;
			}
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("CK_GUID")) {
				this.m_IsCK_GUIDNull = true;
				return;
			}
			if (propname.Equals("关联号")) {
				this.m_Is关联号Null = true;
				return;
			}
			if (propname.Equals("许可证号")) {
				this.m_Is许可证号Null = true;
				return;
			}
			if (propname.Equals("项目类型")) {
				this.m_Is项目类型Null = true;
				return;
			}
			if (propname.Equals("公文类别")) {
				this.m_Is公文类别Null = true;
				return;
			}
			if (propname.Equals("文号")) {
				this.m_Is文号Null = true;
				return;
			}
			if (propname.Equals("文号_类别")) {
				this.m_Is文号_类别Null = true;
				return;
			}
			if (propname.Equals("文号_年号")) {
				this.m_Is文号_年号Null = true;
				return;
			}
			if (propname.Equals("文号_序号")) {
				this.m_Is文号_序号Null = true;
				return;
			}
			if (propname.Equals("抄送")) {
				this.m_Is抄送Null = true;
				return;
			}
			if (propname.Equals("发文时间")) {
				this.m_Is发文时间Null = true;
				return;
			}
			if (propname.Equals("拟稿")) {
				this.m_Is拟稿Null = true;
				return;
			}
			if (propname.Equals("签发")) {
				this.m_Is签发Null = true;
				return;
			}
			if (propname.Equals("公文文头")) {
				this.m_Is公文文头Null = true;
				return;
			}
			if (propname.Equals("项目档案号")) {
				this.m_Is项目档案号Null = true;
				return;
			}
			if (propname.Equals("正文")) {
				this.m_Is正文Null = true;
				return;
			}
			if (propname.Equals("备注")) {
				this.m_Is备注Null = true;
				return;
			}
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
		}
	}
}
